package com.kuang.controller;

import com.kuang.mapper.UsersMapper;
import com.kuang.pojo.Users;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class UserController{
    @Resource
    private UsersMapper usersMapper;

    @GetMapping("/queryusers")
    public List<Users> queryUsersList() {
        List<Users> usersList = usersMapper.queryUsersList();
        for (Users users : usersList) {
            System.out.println(users);
        }
        return usersList;
    }
}
